package com.video.client.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.video.client.bean.Result;
import com.video.client.manager.SocketManager;

/**
 * 测试控制器
 *
 * @author JW
 * @version 1.0
 * @date 2021/5/25 11:40
 */
@RestController
@RequestMapping("/index")
public class IndexController {

	@GetMapping("/index/test")
	public Result test() {
		var r = """
					{
						"name": "index",
						"message": "index"
					}
				""";
		return Result.success("001", r);
	}
	
	@GetMapping
	public Result getAllUser() {
		return Result.success(SocketManager.getUserList(), "ok");
	}
}